package com.maple.myeventbus.demo;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;

import com.maple.myeventbus.R;
import com.maple.myeventbus.core.EventBus;


public class SecondActivity extends Activity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_second);
    }

    public void send(View view) {
//        new Thread(new Runnable() {
//            @Override
//            public void run() {
//                EventBus.getDefault().post(new Friend("Alan", 18));
//            }
//        }).start();
//        new Thread(new Runnable() {
//            @Override
//            public void run() {
                //EventBus.getDefault().post(new Man("Alan", 18));
//            }
//        }).start();
        EventBus.getDefault().post(new Friend("Alan", 18,"boyfriend"));
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
    }
}
